package com.itcam.cm.product.controller;


import com.itcam.cm.model.entity.product.Brand;
import com.itcam.cm.model.entity.product.Category;
import com.itcam.cm.model.entity.product.ProductSku;
import com.itcam.cm.model.vo.common.Result;
import com.itcam.cm.model.vo.product.IndexVo;
import com.itcam.cm.product.service.BrandService;
import com.itcam.cm.product.service.CategoryService;
import com.itcam.cm.product.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/product/brand")
public class BrandController {

    @Autowired
    private BrandService brandService;


    @GetMapping("findAll")
    public Result<List<Brand>> findAll(){
        List<Brand> brands = brandService.findAll();
        return Result.ok(brands);
    }

}
